package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * UserBroadMessageId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class UserBroadMessageId implements java.io.Serializable {

	// Fields

	private Integer uid;
	private Integer num;

	// Constructors

	/** default constructor */
	public UserBroadMessageId() {
	}

	/** full constructor */
	public UserBroadMessageId(Integer uid, Integer num) {
		this.uid = uid;
		this.num = num;
	}

	// Property accessors

	@Column(name = "uid", nullable = false)
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "num", nullable = false)
	public Integer getNum() {
		return this.num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserBroadMessageId))
			return false;
		UserBroadMessageId castOther = (UserBroadMessageId) other;

		return ((this.getUid() == castOther.getUid()) || (this.getUid() != null
				&& castOther.getUid() != null && this.getUid().equals(
				castOther.getUid())))
				&& ((this.getNum() == castOther.getNum()) || (this.getNum() != null
						&& castOther.getNum() != null && this.getNum().equals(
						castOther.getNum())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getNum() == null ? 0 : this.getNum().hashCode());
		return result;
	}

}